#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>

#include "matrix/matrix.h"
#include "matrix/matrix_ext.h"

int main() {
  Matrix *a = InitMatrixFromInput();
  Matrix *at = TransposeMatrix(a);
  Matrix *ata = MatrixMul(at, a);
  PrintMatrix(ata);

  LURes *lures = MatrixLUDecomposition(ata);
  PrintMatrix(lures->matrixU);

  Matrix *aat = MatrixMul(a, at);
  PrintMatrix(aat);

  DestroyLURes(lures);

  DestroyMatrix(aat);
  DestroyMatrix(ata);
  DestroyMatrix(at);
  DestroyMatrix(a);

  return 0;
}